simplification of algebraic fractions